package com.ruoyi.shebei.domain;

import java.time.LocalDate;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 保养记录对象 upkeep
 * 
 * @author admin
 * @date 2024-07-29
 */
public class Upkeep extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 保养表id */
    private Long upkeepId;

    /** 设备表id,外键 */
    @Excel(name = "设备表id,外键")
    private Long shebeiId;

    /** 保养项目 */
    @Excel(name = "保养项目")
    private String byItem;

    /** 保养日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保养日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date byDate;

    /** 保养周期 */
    @Excel(name = "保养周期")
    private Long byCycle;

    /** 设备负责人 */
    @Excel(name = "设备负责人")
    private String principal;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String sbName;

    /** 下次保养提醒日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下次保养提醒日期", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate nextByDate;

    /** 下次保养还剩多少天 */
    @Excel(name = "下次保养还剩多少天")
    private Long daysUntilNextMaintenance;


    public void setUpkeepId(Long upkeepId) 
    {
        this.upkeepId = upkeepId;
    }

    public Long getUpkeepId() 
    {
        return upkeepId;
    }
    public void setShebeiId(Long shebeiId) 
    {
        this.shebeiId = shebeiId;
    }

    public Long getShebeiId() 
    {
        return shebeiId;
    }
    public void setByItem(String byItem) 
    {
        this.byItem = byItem;
    }

    public String getByItem() 
    {
        return byItem;
    }
    public void setByDate(Date byDate)
    {
        this.byDate = byDate;
    }

    public Date getByDate()
    {
        return byDate;
    }
    public void setPrincipal(String principal)
    {
        this.principal = principal;
    }

    public String getPrincipal()
    {
        return principal;
    }
    public void setSbName(String sbName) 
    {
        this.sbName = sbName;
    }

    public String getSbName() 
    {
        return sbName;
    }

    public void setByCycle(Long byCycle)
    {
        this.byCycle = byCycle;
    }

    public Long getByCycle()
    {
        return byCycle;
    }

    public LocalDate getNextByDate() {
        return nextByDate;
    }

    public void setNextByDate(LocalDate nextByDate) {
        this.nextByDate = nextByDate;
    }

    public Long getDaysUntilNextMaintenance() {
        return daysUntilNextMaintenance;
    }

    public void setDaysUntilNextMaintenance(Long daysUntilNextMaintenance) {
        this.daysUntilNextMaintenance = daysUntilNextMaintenance;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("upkeepId", getUpkeepId())
            .append("shebeiId", getShebeiId())
            .append("byItem", getByItem())
            .append("byDate", getByDate())
            .append("principal", getPrincipal())
            .append("sbName", getSbName())
            .append("byCycle", getByCycle())
            .append("nextByDate", getNextByDate())
            .append("daysUntilNextMaintenance",getDaysUntilNextMaintenance())
            .toString();
    }
}
